#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
	double c;
	cin>>c;
	while (c != 0.00)
	{
		double sum = 0.0;
		double i = 2;
		while (sum < c) {
			sum += (1 / i);
			++i;
		}
		cout<<i - 2<<" card(s)"<<endl;
		cin>>c;
	}
	return 0;
}